The present invention relates generally to the field of computer storage, and more particularly to high capacity removable media devices which may be accessed and booted, regardless of format configuration, as either a floppy or hard disk.
The current standard 1.44 megabyte floppy removable media is becoming increasingly inadequate to meet user needs. In response, BIOS vendors have begun offering systems which allow High Capacity Removable Media (HCRM) drives, such as Iomega Corporation""s ZIP(copyright) drive, to be BIOS configurable as either a hard drive, or a floppy drive. Although HCRM drives are not new to the PC industry, they have traditionally been used as removable hard drives, and therefore the HCRM media is generally partitioned in the same manner as conventional hard disks. One of the problems stemming from the use of HCRM drives as floppies is the inability of DOS based operating systems to boot from or access partitioned media in a floppy drive. Because of the ability to change the configuration of the drive, a single format is needed that will boot, and allow access to the media, regardless of it""s current configuration. This format should be compatible with existing partitioned media so that they can be used without requiring reformatting, or otherwise destroying the data they contain.
The boot process of IBM compatible computers begins with the BIOS reading the boot sector of the boot drive into memory and executing it. If the required boot record code and/or data structure is missing from the media, the boot process will fail to load the operating system. For example, in systems which allow HCRM drives to be configured as either A: (i.e. a floppy) or C: (i.e. a hard disk); with the HCRM drive configured as C: the partitioned media will boot because a Master Boot Record (MBR) and Partition Table are present in the boot sector. However when a HCRM drive containing a partitioned media is configured as A:, where no Partition Table is required, the media will fail to boot. This is because the standard MBR code is designed to boot a hard drive, and always assumes a BIOS drive number of 80h. Conversely, if the user is attempting to boot from a floppy formatted media in a drive configured as C:, the boot will fail because the variable in the BIOS parameter block that tells the DOS Boot Record (DBR) code which BIOS drive number to boot from, will be set to 00h.
The reason for the system""s failure to boot is due to the fact that operating systems, which are designed to read DOS formatted disks, require different data structures to be present in the boot sector of the disk depending on whether the disk drive is a floppy drive (typically having BIOS drive numbers 0 or 1) or a hard disk drive (typically having BIOS drive number 80h or higher). The operating system initially determines how it will access media configured as floppy by scanning each floppy drive (BIOS drive number 0 and 1) and using the BIOS Parameter Block (BPB), to locate the media""s root directory, FATs, and data area. The operating system will assign a drive letter when the presence of drive 0 (A:) and 1 (B:) is detected. However, media access is determined by the presence of a correct BPB at sector 0; that is, the data contained in drive A: or B: can only be accessed when the BPB is present at sector 0. For partitioned media such as a HCRM configured as C:, the operating system will scan all drives looking for DOS type partitions, as defined in the system type file of the Partition Table, and will only assign a drive letter if a BPB is found in the first sector of each partition. The BPB for a hard drive formatted media does not reside in sector 0. Therefore, when attempting to use a partitioned HCRM as A: (i.e. a floppy), the operating system will not be able to access the data on the media.
To support existing HCRM media, a solution is needed that will allow partitioned media to function properly when inserted into a floppy configured HCRM drive. As indicated above, this requires addressing two problems, booting, and access to data. Additionally, for a solution to be viable, it must provide a simple way for existing media to be updated, without compromising the user""s data.
The present invention solves the problems discussed above that are associated with accessing and booting a removable partitioned computer storage media, such as a HCRM device, as a floppy. In accordance with the present invention a removable partitioned media can be both accessed and booted by the operating system as either a floppy or a hard disk, by replacing the standard MBR with a Dual Use MBR. To allow the operating system to locate the BPB where it is expected to reside, which for floppy drives means that a BPB must be located at sector 0, and for fixed disks a BPB must be present in the first sector of the partition, the present invention takes a hard drive formatted media and replaces the contents of the Boot Sector with a new MBR, referred to in this disclosure as xe2x80x9cDUMBRxe2x80x9d (Dual Use Master Boot Record), that contains new code in accordance with the invention, a Partition Table, and the addition of floppy BPB. The new code first determines the drive number used by the system BIOS for initiating the boot process and saves the result. Once the DBR of the first active partition is read into RAM, the new code then determines if the saved drive number value is 0 (or 00h), indicating that the boot drive is a floppy. If the boot was initiated from a floppy (saved drive number is 0), the new code overwrites the hard disk BPB in RAM with the floppy BPB of DUMBR. The code then jumps to the DBR code in the RAM buffer that has been overwritten with the floppy BPB, and the boot process continues as normal.